#ifndef _DevicesFlash_H_
#define _DevicesFlash_H_


#define FLASH_PAGE_SIZE             ((uint32_t)4096)
#define FLASH_BASE_ADDR             ((uint32_t)0x3C000000)
#define FLASH_USER_MAX_ADDR         (FLASH_BASE_ADDR + (384 * 1024))


/* size: 64k Byte */
#define FLASH_BOOTLOADER_ADDR       (FLASH_BASE_ADDR + 1024 * (0))
/* size: 4k Byte */
#define FLASH_SYSTEM_DATA_ADDR      (FLASH_BASE_ADDR + 1024 * (64))
/* size: 4k Byte */
#define FLASH_USER_DATA_ADDR        (FLASH_BASE_ADDR + 1024 * (64 + 4))
/* size: 312k Byte */
#define FLASH_APP_ADDR              (FLASH_BASE_ADDR + 1024 * (64 + 4 + 4))


int8_t cFlashWriteDatas(uint32_t uiAddress, const void *pvBuff, int32_t iLength);
int8_t cFlashReadDatas(uint32_t uiAddress, void *pvBuff, int32_t iLength);


#endif
